﻿// 开发者:micropu
// 公司:佛山远钧智慧科技有限公司

using Microsoft.CodeAnalysis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Admin.NET.Application.Entity;

/// <summary>
/// 人员信息
/// </summary>
[SugarTable("zj_Employee", TableDescription = "人员信息")]
public class Employee : EntityTenantBaseData
{
    /// <summary>
    /// 项目ID
    /// </summary>
    [SugarColumn(ColumnDescription = "项目ID")]
    public long ProjectId { get; set; }

    /// <summary>
    /// 所属项目
    /// </summary>
    [SugarColumn(IsIgnore = true)]
    [Navigate(NavigateType.OneToOne, nameof(ProjectId))]
    public Project Project { get; set; }

    /// <summary>
    /// 住建ID
    /// </summary>
    [SugarColumn(ColumnDescription = "住建ID", Length = 50, IsNullable = true)]
    public string ZjEmpID { get; set; }

    /// <summary>
    /// 姓名
    /// </summary>
    [SugarColumn(ColumnDescription = "姓名", Length = 50)]
    public string Name { get; set; }

    /// <summary>
    /// 身份证号
    /// </summary>
    [SugarColumn(ColumnDescription = "身份证号", Length = 30, IsNullable = true)]
    public string IdNum { get; set; }

    /// <summary>
    /// 年龄
    /// </summary>
    [SugarColumn(ColumnDescription = "年龄",DefaultValue = "0")]
    public int Age { get; set; }

    /// <summary>
    /// 性别
    /// </summary>
    [SugarColumn(ColumnDescription = "性别")]
    public GenderEnum Sex { get; set; }

    /// <summary>
    /// 民族
    /// </summary>
    [SugarColumn(ColumnDescription = "民族", Length = 10, IsNullable = true)]
    public string Nation { get; set; }

    /// <summary>
    /// 生日
    /// </summary>
    [SugarColumn(ColumnDescription = "生日", Length = 20, IsNullable = true)]
    public string Birthday { get; set; }

    /// <summary>
    /// 住址
    /// </summary>
    [SugarColumn(ColumnDescription = "住址", Length = 300, IsNullable = true)]
    public string Address { get; set; }

    /// <summary>
    /// 户籍
    /// </summary>
    [SugarColumn(ColumnDescription = "户籍", Length = 20, IsNullable = true)]
    public string Native { get; set; }

    /// <summary>
    /// 电话
    /// </summary>
    [SugarColumn(ColumnDescription = "电话", Length = 20, IsNullable = true)]
    public string Phone { get; set; }

    /// <summary>
    /// 注册人脸
    /// </summary>
    [SugarColumn(ColumnDescription = "注册人脸", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
    public string Facephoto { get; set; }

    /// <summary>
    /// 工种
    /// </summary>
    [SugarColumn(ColumnDescription = "工种", Length = 50, IsNullable = true)]
    public string WorkType { get; set; }

    /// <summary>
    /// 工作组
    /// </summary>
    [SugarColumn(ColumnDescription = "工作组", Length = 50, IsNullable = true)]
    public string WorkGroup { get; set; }

    /// <summary>
    /// 紧急联系人
    /// </summary>
    [SugarColumn(ColumnDescription = "紧急联系人", Length = 50, IsNullable = true)]
    public string EmerPeople { get; set; }

    /// <summary>
    /// 紧急联系人电话
    /// </summary>
    [SugarColumn(ColumnDescription = "紧急联系人电话", Length = 50, IsNullable = true)]
    public string EmerPhone { get; set; }

    /// <summary>
    /// 文化程度
    /// </summary>
    [SugarColumn(ColumnDescription = "文化程度", Length = 50, IsNullable = true)]
    public string Culture { get; set; }

    /// <summary>
    /// 健康状况
    /// </summary>
    [SugarColumn(ColumnDescription = "健康状况", Length = 50, IsNullable = true)]
    public string Health { get; set; }

    /// <summary>
    /// 签发机关（长度20个字符）
    /// </summary>
    [SugarColumn(ColumnDescription = "签发机关（长度20个字符）", Length = 50, IsNullable = true)]
    public string QianFaJiGuan { get; set; }

    /// <summary>
    /// 身份证正面照
    /// </summary>
    [SugarColumn(ColumnDescription = "身份证正面照", Length = 50, IsNullable = true)]
    public string IDcard_A { get; set; }

    /// <summary>
    /// 身份证反面照 
    /// </summary>
    [SugarColumn(ColumnDescription = "身份证反面照", Length = 50, IsNullable = true)]
    public string IDcard_B { get; set; }

    /// <summary>
    /// 身份证起始日期（格式：2000-01-01）
    /// </summary>
    [SugarColumn(ColumnDescription = "身份证起始日期", Length = 50, IsNullable = true)]
    public string QiXianQiShi { get; set; }

    /// <summary>
    /// 身份证失效日期（无失效日期传”长期”）
    /// </summary>
    [SugarColumn(ColumnDescription = "身份证失效日期", Length = 50, IsNullable = true)]
    public string QiXianShiXiao { get; set; }

    /// <summary>
    /// 银行名称
    /// </summary>
    [SugarColumn(ColumnDescription = "银行名称", Length = 50, IsNullable = true)]
    public string BankName { get; set; }

    /// <summary>
    /// 银行账号
    /// </summary>
    [SugarColumn(ColumnDescription = "银行账号", Length = 50,IsNullable = true)]
    public string BankAccount { get; set; }

    /// <summary>
    /// 是否自动审核
    /// </summary>
    [SugarColumn(ColumnDescription = "是否自动审核", DefaultValue = "true")]
    public bool IsAutoAudit { get; set; }

    /// <summary>
    /// 是否允许移动打卡
    /// </summary>
    [SugarColumn(ColumnDescription = "是否允许移动打卡",DefaultValue = "false")]
    public bool IsMobile { get; set; }

    /// <summary>
    /// 移动端登录账号
    /// </summary>
    [SugarColumn(ColumnDescription = "移动端登录账号", IsNullable = true)]
    public string MobileAccount { get; set; }

    /// <summary>
    /// 移动端登录密码
    /// </summary>
    [SugarColumn(ColumnDescription = "移动端登录密码", IsNullable = true)]
    public string MobilePassword { get; set; }

    /// <summary>
    /// 注册人脸长度
    /// </summary>
    [SugarColumn(ColumnDescription = "注册人脸长度")]
    public int PicLen { get; set; }

    /// <summary>
    /// 采集照片
    /// </summary>
    [SugarColumn(IsIgnore = true)]
    [Navigate(NavigateType.OneToMany, nameof(CaiJiPhotos.EmployeeId))]
    public List<CaiJiPhotos> CaiJiPhoto { get; set; }

    /// <summary>
    /// 是否同步到设备
    /// </summary>
    [SugarColumn(ColumnName = "IsSendClient")]
    public bool IsSendClient { get; set; } = false;

    /// <summary>
    /// 同步人员到设备错误信息
    /// </summary>
    [SugarColumn(ColumnName = "SendClientErr")]
    public string SendClientErr { get; set; } = "";
}



